Carbon


Line

Header: Quickdraw.h Carbon status: Supported

Draws a line a specified distance from the graphics pen’s current location in the current graphics port.

void Line (
    SInt16 dh, 
    SInt16 dv
);
Parameter descriptions
dh

The horizontal distance of the graphics pen’s movement.

dv

The vertical distance of the graphics pen’s movement.

DISCUSSION

Starting at the current location of the graphics pen, the Line function draws a line the horizontal distance that you specify in the dh parameter and the vertical distance that you specify in the dv parameter. The Line function calls

LineTo(h+dh,v+dv)

where (h,v) is the current location in local coordinates. The pen location becomes the coordinates of the end of the line after the line is drawn. If you are using Line to draw a region or polygon, its outline is infinitely thin and is not affected by the values of the pnSize, pnMode, and pnPat fields of the graphics port.

SPECIAL CONSIDERATIONS

The Line function may move or purge memory blocks in the application heap; do not call this function at interrupt time.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)